
public class Employee implements Visitable {
	
	protected String name;
	protected int salary;
	protected int level;
	
	public Employee (String name, int salary, int level) {
		this.name = name;
		this.salary = salary;
		this.level = level;
	}
	
	public int getSalary() {
		return salary;
	}
	
	@Override
	public String toString() {
		String str = "";
		for (int i = 0; i < level; i++)
			str = str + "\t";
		return str + "[(emp) " + name + " - " + salary + "]";
	}
	
	@Override
	public void accept (Visitor v) {
		v.visit(this);
	}
}
